import Vue from 'vue'
import Router from 'vue-router'


Vue.use(Router)


export default new Router({
    routes: [{
            path: '/',
            redirect: '/eventList'
        },
        {
            path: '/home', //主页
            component: resolve => require(['@/components/home/home'], resolve)
        },
        {
          path: '/enterpriseHome', //企业2
          component: resolve => require(['@/components/enterprise/enterpriseHome'], resolve)
        },
        {
            path: '/reportSuccess', //上报成功，此页面需要传入query:{'name': '', 'idNumber':'123','phone': '123'}
            component: resolve => require(['@/components/commons/reportSuccess'], resolve)
        },
        {
            path: '/functionBox', //应急APP功能箱
            component: resolve => require(['@/components/home/functionBox'], resolve)
        },
        {
            path: '/needResurce', //资源需求(新的)
            component: resolve => require(['@/components/needResurce/needResurce'], resolve)
        },
        {
            path: '/eventList', //事件列表
            component: resolve => require(['@/components/event/eventList'], resolve)
        },
        {
            path: '/eventInfo', //事件详情
            component: resolve => require(['@/components/event/eventInfo'], resolve)
        },
        {
            path: '/taskList', //任务清单
            component: resolve => require(['@/components/taskList/taskList'], resolve)
        },
        {
            path: '/feedbackAndroid', //信息采集（Android调用）
            component: resolve => require(['@/components/event/feedbackAndroid'], resolve)
        },
        {
            path: '/wxfeedback', //信息采集（Android调用）
            component: resolve => require(['@/components/event/wxfeedback'], resolve)
        },
        { 
            path: '/feedbackList', //反馈列表
            component: resolve => require(['@/components/feedback/feedbackList'], resolve)
        },
        {
            path: '/feedbackDetails', //反馈详情
            component: resolve => require(['@/components/feedback/feedbackDetails'], resolve)
        },
        {
            path: '/commitfeedback', //提交反馈
            component: resolve => require(['@/components/taskList/commitfeedback'], resolve)
        },
        {
            path: '/dispatch', //补充信息
            component: resolve => require(['@/components/event/dispatch'], resolve)
        },
        {
            path: '/participateRescue', //参与救援主页面
            component: resolve => require(['@/components/participateRescue/participateRescue'], resolve)
        },
        {
            path: '/formChild', //补充行动救援
            component: resolve => require(['@/components/registration/formChild'], resolve)
        },
        {
            path: '/form', //参与救援主页面
            component: resolve => require(['@/components/registration/form'], resolve)
        },
        {
            path: '/formElement', //补充行动救援(新的)
            component: resolve => require(['@/components/registration/formElement'], resolve)
        },
        {
            path: '/formY', //表单页面测试
            component: resolve => require(['@/components/formY'], resolve)
        },
        {
            path: '/comingSoon', //敬请期待
            component: resolve => require(['@/components/commons/comingSoon'], resolve)
        },
        { path: '*', component: resolve => require(['@/components/commons/notFound'], resolve) }, //路由按顺序从上到下，依次匹配。最后一个*能匹配全部，然后重定向到主页面
    ]
})